
wo3g.out: main.o getblg.o serv_wo3g.o tool.o check.o msg_queue.o userbuf.o db.o init_conf.o ctrlsockfd.o msgout.o
	gcc -o wo3g.out main.o getblg.o serv_wo3g.o tool.o check.o msg_queue.o userbuf.o db.o init_conf.o ctrlsockfd.o msgout.o -I/usr/include/mysql  -DBIG_JOINS=1 -fPIC -L/usr/lib/mysql -lmysqlclient -lpthread -lrt

main.o: main.c
	gcc -c main.c
serv_wo3g.o: serv_wo3g.c
	gcc -c serv_wo3g.c
tool.o: tool.c
	gcc -c tool.c
check.o: check.c
	gcc -c check.c
msg_queue.o: msg_queue.c
	gcc -c msg_queue.c
userbuf.o: userbuf.c
	gcc -c userbuf.c
db.o: db.c
	gcc -c db.c $(mysql_config --cflags) $(mysql_config --libs)
init_conf.o:init_conf.c
	gcc -c init_conf.c
ctrlsockfd.o:ctrlsockfd.c
	gcc -c ctrlsockfd.c

getblg.o: getblg.c
	gcc -c getblg.c

msgout.o:msgout.c
	gcc -c msgout.c
clean:
	-rm *.o


